/**
 * 
 */
package uit.comstore.model.entity;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * @author XIII
 *
 */
@Entity
@Table(name="Feedbacks")
@SuppressWarnings("serial")
public class Feedback implements Serializable {

	private Long id;
	private String title;
	private String content;
	private Date datePosted;
	
	private Customer customer;

	@Id
	@GeneratedValue
	@Column(name="FeedbacksId")
	public Long getId() {
		return id;
	}
	public void setId(Long id) {
		this.id = id;
	}

	@Column(name="Title")
	public String getTitle() {
		return title;
	}
	public void setTitle(String title) {
		this.title = title;
	}

	@Column(name="Content")
	public String getContent() {
		return content;
	}
	public void setContent(String content) {
		this.content = content;
	}

	@Column(name="DatePost")
	public Date getDatePosted() {
		return datePosted;
	}
	public void setDatePosted(Date datePosted) {
		this.datePosted = datePosted;
	}

	@ManyToOne(cascade=CascadeType.MERGE)
	@JoinColumn(name="CumtomersId", referencedColumnName="CustomersId")
	public Customer getCustomer() {
		return customer;
	}
	public void setCustomer(Customer customer) {
		this.customer = customer;
	}
}
